package apiday01;

import java.util.Optional;

public class StringStringBuilderDemo {
    public static void main(String[] args) {
        /*StringBuilder builder = new StringBuilder("a");
        for(int i =0;i < 10000000;i++){
            builder.append(i);
        }
        System.out.println("执行完毕");*/

        /*StringBuilder builder2 = new StringBuilder("abc");  //abc串
        String str  = "abc";
        StringBuilder builder3 = new StringBuilder(str);    //abc串
        String str3 = builder3.toString();  //将builder3转换为String类型
        System.out.println(builder2);
        System.out.println(builder3);
        System.out.println(str3);*/

















       /* String str   =  "好好学习java";
        StringBuilder builder = new StringBuilder(str);

        builder.append(",为了找个好工作");
        System.out.println(builder);

        builder.replace(9,16,"就是为了改变世界");
        System.out.println(builder);

        builder.delete(0,8);
        System.out.println(builder);

        builder.insert(0,"活着");
        System.out.println(builder);*/

        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        /*String s = "a";
        for(int i = 0; i < 10000000;i++){
            s = s + i;
        }
        System.out.println("执行完毕");*/
    }
}